package com.ly.mpayment.persist.service.yidong;

import java.util.Map;

import com.ly.mpayment.persist.entity.yidong.NumberPool;
import com.ly.mpayment.persist.hibernate.Page;

public interface INumberPoolService {

	public Page<NumberPool> findPageNumberPool(Map<String, Object> parameters ,int start,int pageSize);
	
	public boolean saveNumberPool(NumberPool pool);
	
	public boolean updateNumberPool(NumberPool pool);
	
	public NumberPool findByPhone(String phone);
	
	public NumberPool findByPhoneMonth(String phone);
	
	public NumberPool findById(String id);
	
	public Page<NumberPool> findLoginPool(int start,int pageSize);
	
	public long findLoginPoolCount();

	/**
	 * 查询第一个可以使用充值的号码池号码
	 * @return
	 */
	public NumberPool findUsePool();
	
	public NumberPool findUsePoolDaoxu(int num);
	
	
	public long findUsedPoolCount();
	
	public Page<NumberPool> findUsedPoolCount(int start,int pageSize);
	
	/**
	 * 查询可用的号码池 
	 * @return
	 */
	public long findIsUse();
	
	/**
	 * 查询未使用的号码
	 * @param start
	 * @param pageSize
	 * @return
	 */
//	public Page<NumberPool> findNotUsed(int start,int pageSize);
	
}
